package com.chunlei.complete.queue;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2021/4/18 0:14
 */
public class QueueClient
{
    public static void main(String[] args)
    {
        LinkedBlockingQueue<List<String>> queue = new LinkedBlockingQueue<>();
        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        list.add("3");
        queue.add(list);
        for (int i = 0; i < queue.size(); i++)
        {
            List<String> list1 = queue.poll();
            list1.forEach(e -> {
                System.out.println("e = " + e);
            });
        }
    }
}
